{template 'header'}
<ul class="nav nav-tabs">
    <li class=""><a href="{php echo $this->createWeburl('answer');}">答题管理</a></li>
    <li class="active"><a href="{php echo $this->createWeburl('answer', array('op' => 'addshow'));}">添加题库</a></li>
    <li class=""><a href="{php echo $this->createWeburl('answerRecord');}">答题参与记录</a></li>
</ul>
<form action="" method="post" class="form-horizontal" id="myform" role="form" enctype="multipart/form-data">
    <div class="form-group" id="free">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">问题<span style="color: red">*</span>:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="title" placeholder="问题" value="{$answer['title']}" type="text">

        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">答案1<span style="color: red">*</span>:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="answer_one" placeholder="答案1" value="{$answer['answer_one']}" type="text">
            <small style="color: red">建议不超过10个文字</small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">答案2<span style="color: red">*</span>:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="answer_two" placeholder="答案2" value="{$answer['answer_two']}" type="text">
            <small style="color: red">建议不超过10个文字</small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">正确答案</label>
        <div class="col-sm-9 col-xs-12">
            <label class="radio-inline">
                <input type="radio" name="correct" value="1" {if $answer['correct'] ==1 || $answer['correct'] == '' } checked {/if}/>答案1
            </label>
            <label class="radio-inline">
                <input type="radio" name="correct" value="2" {if $answer['correct'] ==2 } checked {/if} />答案2
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label"></label>
        <div class="" >
            <input type="hidden" name="op" value="{php echo $answer['id'] > 0 ? 'add' : 'edit' }">
            <input type="hidden" name="id" value="{$answer['id']}">
            <input type="submit" name="submit" id="submit" value="{php echo $answer['id'] > 0 ? '修改' : '添加' }" class="btn btn-primary">
        </div>
    </div>
</form>
{template 'footer'}
